using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.IO;
using System.Xml.Serialization;
using System.Windows.Forms;

namespace BodySoundSimulator.AbsoluteMapData
{

    /// <summary>
    /// Refer to F:\Asanka\lec_notes\MSC Project\MscWorkBench\notes\rib-cage.jpg
    /// </summary>
    public class AbsoluteBodyFeatures
    {
        #region Fields
        PointF jugularNotch;
        //all points will have relative locations to jugularNotch
        PointF cavicleEndLeft;
        PointF cavicleEndRight;
        PointF chinMargin;
        PointF spineEnd;
        RibInfo ribOneLeft;
        RibInfo ribOneRight;
        RibInfo ribTwoLeft;
        RibInfo ribTwoRight;
        RibInfo ribThreeLeft;
        RibInfo ribThreeRight;
        RibInfo ribFourLeft;
        RibInfo ribFourRight;
        RibInfo ribFiveLeft;
        RibInfo ribFiveRight;
        RibInfo ribSixLeft;
        RibInfo ribSixRight;
        RibInfo ribSevenLeft;
        RibInfo ribSevenRight;
        #endregion

        #region Properties
        public PointF JugularNotch
        {
            get { return jugularNotch; }
            set { jugularNotch = value; }
        }

        public PointF CavicleEndLeft
        {
            get { return cavicleEndLeft; }
            set { cavicleEndLeft = value; }
        }

        public PointF CavicleEndRight
        {
            get { return cavicleEndRight; }
            set { cavicleEndRight = value; }
        }

        public PointF ChinMargin
        {
            get { return chinMargin; }
            set { chinMargin = value; }
        }

        public PointF SpineEnd
        {
            get { return spineEnd; }
            set { spineEnd = value; }
        }

        public RibInfo RibOneLeft
        {
            get { return ribOneLeft; }
            set { ribOneLeft = value; }
        }

        public RibInfo RibOneRight
        {
            get { return ribOneRight; }
            set { ribOneRight = value; }
        }

        public RibInfo RibTwoLeft
        {
            get { return ribTwoLeft; }
            set { ribTwoLeft = value; }
        }

        public RibInfo RibTwoRight
        {
            get { return ribTwoRight; }
            set { ribTwoRight = value; }
        }

        public RibInfo RibThreeLeft
        {
            get { return ribThreeLeft; }
            set { ribThreeLeft = value; }
        }

        public RibInfo RibThreeRight
        {
            get { return ribThreeRight; }
            set { ribThreeRight = value; }
        }

        public RibInfo RibFourLeft
        {
            get { return ribFourLeft; }
            set { ribFourLeft = value; }
        }

        public RibInfo RibFourRight
        {
            get { return ribFourRight; }
            set { ribFourRight = value; }
        }

        public RibInfo RibFiveLeft
        {
            get { return ribFiveLeft; }
            set { ribFiveLeft = value; }
        }

        public RibInfo RibFiveRight
        {
            get { return ribFiveRight; }
            set { ribFiveRight = value; }
        }

        public RibInfo RibSixLeft
        {
            get { return ribSixLeft; }
            set { ribSixLeft = value; }
        }

        public RibInfo RibSixRight
        {
            get { return ribSixRight; }
            set { ribSixRight = value; }
        }

        public RibInfo RibSevenLeft
        {
            get { return ribSevenLeft; }
            set { ribSevenLeft = value; }
        }

        public RibInfo RibSevenRight
        {
            get { return ribSevenRight; }
            set { ribSevenRight = value; }
        }
        #endregion

        #region Public methods
        public void FillDummyInfo()
        {
            this.jugularNotch = new PointF(0, 0);
            this.cavicleEndLeft = new PointF(-98.6f, -9.6f);
            this.CavicleEndRight = new PointF(98.6f, -9.6f);
            this.chinMargin = new PointF(0, -52.3f);
            this.spineEnd = new PointF(0, 196);
            this.ribOneLeft = new RibInfo(new PointF(-14.9f, 9.4f),
                new PointF(-24.9f, 9.4f),
                new PointF(-44.1f, 4),
                new PointF(-15.9f, 17.6f),
                new PointF(-26.8f, 16.8f),
                new PointF(-47.7f, 7.7f));
            this.ribOneRight = new RibInfo(new PointF(14.9f, 9.4f),
                new PointF(24.9f, 9.4f),
                new PointF(44.1f, 4),
                new PointF(15.9f, 17.6f),
                new PointF(26.8f, 16.8f),
                new PointF(47.7f, 7.7f));
            this.ribTwoLeft = new RibInfo(new PointF(-12.3f, 33.1f),
                new PointF(-25.9f, 33.1f),
                new PointF(-58.6f, 14.1f),
                new PointF(-11.4f, 44.1f),
                new PointF(-26.8f, 41.4f),
                new PointF(-67.7f, 21.3f));
            this.ribTwoRight = new RibInfo(new PointF(12.3f, 33.1f),
                new PointF(25.9f, 33.1f),
                new PointF(58.6f, 14.1f),
                new PointF(11.4f, 44.1f),
                new PointF(26.8f, 41.4f),
                new PointF(67.7f, 21.3f));
            this.ribThreeLeft = new RibInfo(new PointF(-12.3f, 53.1f),
                new PointF(-29.6f, 54.0f),
                new PointF(-70.5f, 31.3f),
                new PointF(-12.3f, 62.2f),
                new PointF(-31.4f, 63.1f),
                new PointF(-75.0f, 44.1f));
            this.ribThreeRight = new RibInfo(new PointF(12.3f, 53.1f),
                new PointF(29.6f, 54.0f),
                new PointF(70.5f, 31.3f),
                new PointF(12.3f, 62.2f),
                new PointF(31.4f, 63.1f),
                new PointF(75.0f, 44.1f));
            this.ribFourLeft = new RibInfo(new PointF(-14.1f, 75.9f),
                new PointF(-40.5f, 81.3f),
                new PointF(-79.7f, 54.0f),
                new PointF(-14.1f, 86.0f),
                new PointF(-42.3f, 91.3f),
                new PointF(-84.2f, 60.4f));
            this.ribFourRight = new RibInfo(new PointF(14.1f, 75.9f),
                new PointF(40.5f, 81.3f),
                new PointF(79.7f, 54.0f),
                new PointF(14.1f, 86.0f),
                new PointF(42.3f, 91.3f),
                new PointF(84.2f, 60.4f));
            this.ribFiveLeft= new RibInfo(new PointF(-14.9f, 94.0f),
                new PointF(-44.1f, 106.0f),
                new PointF(-86.0f, 77.7f),
                new PointF(-13.2f, 106.0f),
                new PointF(-46.8f, 117.8f),
                new PointF(-86.0f, 90.5f));
            this.ribFiveRight = new RibInfo(new PointF(14.9f, 94.0f),
                new PointF(44.1f, 106.0f),
                new PointF(86.0f, 77.7f),
                new PointF(13.2f, 106.0f),
                new PointF(46.8f, 117.8f),
                new PointF(86.0f, 90.5f));
            this.ribSixLeft = new RibInfo(new PointF(-13.2f, 106.0f),
                new PointF(-50.4f, 129.6f),
                new PointF(-89.5f, 100.5f),
                new PointF(-9.4f, 114.0f),
                new PointF(-55.9f, 139.6f),
                new PointF(-93.3f, 112.3f));
            this.ribSixRight = new RibInfo(new PointF(13.2f, 106.0f),
                new PointF(50.4f, 129.6f),
                new PointF(89.5f, 100.5f),
                new PointF(9.4f, 114.0f),
                new PointF(55.9f, 139.6f),
                new PointF(93.3f, 112.3f));
            this.ribSevenLeft = new RibInfo(new PointF(-9.4f, 114.2f),
                new PointF(-59.5f, 152.4f),
                new PointF(-90.5f, 126.9f),
                new PointF(-4.0f, 122.4f),
                new PointF(-62.3f, 162.4f),
                new PointF(-93.3f, 136.9f));
            this.ribSevenRight = new RibInfo(new PointF(9.4f, 114.2f),
                new PointF(59.5f, 152.4f),
                new PointF(90.5f, 126.9f),
                new PointF(4.0f, 122.4f),
                new PointF(62.3f, 162.4f),
                new PointF(93.3f, 136.9f));
        }

        #endregion
    }
}
